package com.spic.business.plan.supplies.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.spic.business.common.core.utils.poi.ExcelErrMsg;
import com.spic.business.common.utils.UserCodeConverter;
import com.spic.common.core.annotation.Excel;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import java.util.Date;
@Getter
@Setter
public class PlanExcelDto extends ExcelErrMsg {
    /** 物资名称 */
    @Excel(name = "物资名称")
    @NotBlank(message = "物资名称不能为空")
    @ExcelProperty(value = "物资名称", converter = UserCodeConverter.class)
    private String materialName;

    /** 物资编码 */
    @Excel(name = "物资编码")
    private String materialCode;

    /** 物资类型 */
    @Excel(name = "物资类型")
    private String materialType;

    /** 规格型号 */
    @Excel(name = "规格型号")
    private String specificationModels;

    /** 库存数量 */
    @Excel(name = "库存数量")
    private Double quantityStock;

    /** 单位 */
    @Excel(name = "单位")
    private String monad;

    /** 放置位置 */
    @Excel(name = "放置位置")
    private String settingPosition;

    /** 保质期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "保质期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expirationDate;

    /** 检查标准 */
    @Excel(name = "检查标准")
    private String inspectionStandard;

    @Excel(name = "状态")
    private String state;

    @Override
    public String getBusinessKey() {
        return getMaterialCode();
    }
}
